Groups the elements of a view according to a specified key selector function
and projects the elements for each group by using a specified function.
Namespace:
C1.LiveLinq.LiveViewsAssembly: C1.Silverlight.LiveLinq (in C1.Silverlight.LiveLinq.dll)
Syntax
C# |
---|
public View<GroupView<TKey, TElement>> GroupBy<TKey, TElement>( Expression<Func<T, TKey>> keySelector, Expression<Func<T, TElement>> elementSelector ) |
Visual Basic |
---|
Public Function GroupBy(Of TKey, TElement) ( _ keySelector As Expression(Of Func(Of T, TKey)), _ elementSelector As Expression(Of Func(Of T, TElement)) _ ) As View(Of GroupView(Of TKey, TElement)) |
Parameters
- keySelector
- Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'T, TKey>)>)>>)>)>
A function to extract the key for each element.
- elementSelector
- Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'T, TElement>)>)>>)>)>
A function to map each source element to a TElement.
Type Parameters
- TKey
- The type of the key returned by keySelector.
- TElement
- The type of the element to which elements of each group are projected.